cmake_minimum_required(VERSION 2.8.3)
project(rosopencv)

add_compile_options(-std=c++11)

find_package(catkin REQUIRED COMPONENTS
  cv_bridge
  image_transport
  roscpp
  sensor_msgs
  std_msgs
)
find_package(OpenCV REQUIRED)
# find_package(Boost REQUIRED COMPONENTS system)

## Generate messages in the 'msg' folder
# add_message_files(
#   FILES
#   Message1.msg
#   Message2.msg
# )

## Generate services in the 'srv' folder
# add_service_files(
#   FILES
#   Service1.srv
#   Service2.srv
# )

## Generate actions in the 'action' folder
# add_action_files(
#   FILES
#   Action1.action
#   Action2.action
# )

## Generate added messages and services with any dependencies listed here
# generate_messages(
#   DEPENDENCIES
#   sensor_msgs#   std_msgs
# )

catkin_package(
#  INCLUDE_DIRS include
#  LIBRARIES rosopencv
#  CATKIN_DEPENDS cv_bridge image_transport roscpp sensor_msgs std_msgs
#  DEPENDS system_lib
)


include_directories(include ${catkin_INCLUDE_DIRS})
include_directories(include ${OpenCV_INCLUDE_DIRS})

include_directories(/opt/ros/kinetic/include)
link_directories(/opt/ros/kinetic/lib)

## Declare a C++ library
# add_library(${PROJECT_NAME}
#   src/${PROJECT_NAME}/rosopencv.cpp
# )

add_executable(simple_imgproc src/simple_imgproc.cpp)
target_link_libraries(simple_imgproc ${catkin_LIBRARIES} ${OpenCV_LIBS})

add_executable(simple_video src/simple_video.cpp)
target_link_libraries(simple_video ${catkin_LIBRARIES} ${OpenCV_LIBS})

add_executable(simple_camera src/simple_camera.cpp)
target_link_libraries(simple_camera ${catkin_LIBRARIES} ${OpenCV_LIBS})

add_executable(aruco_gen src/aruco_gen.cpp)
target_link_libraries(aruco_gen ${catkin_LIBRARIES} ${OpenCV_LIBS})


# add_executable(imageturn3_cv src/imageturn3.cpp)
# target_link_libraries(imageturn3_cv ${catkin_LIBRARIES} ${OpenCV_LIBS})
# add_dependencies(imageturn3_cv ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})

## Add cmake target dependencies of the library
## as an example, code may need to be generated before libraries
## either from message generation or dynamic reconfigure
# add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})

## Rename C++ executable without prefix
## The above recommended prefix causes long target names, the following renames the
## target back to the shorter version for ease of user use
## e.g. "rosrun someones_pkg node" instead of "rosrun someones_pkg someones_pkg_node"
# set_target_properties(${PROJECT_NAME}_node PROPERTIES OUTPUT_NAME node PREFIX "")

## Add cmake target dependencies of the executable
## same as for the library above
# add_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})

## Specify libraries to link a library or executable target against
# target_link_libraries(${PROJECT_NAME}_node
#   ${catkin_LIBRARIES}
# )

